import java.util.Scanner;

//计算一个数的二进制中有几个1
public class Test {
    public static void main(String[] args) {
        int a = -1 ;
        int count = 0;
        while (a != 0) {
            if ((a & 1) != 0) {
                count++;
            }
            a = a >>> 1;
        }
        System.out.println(count);
    }
}